package com.wcity.manage.service.impl.businessImpl;

import com.wcity.manage.dao.dal.model.PageModel;
import com.wcity.manage.dao.mapper.businessMapper.BusinessMapper;
import com.wcity.manage.dao.model.business.BusinessInfo;
import com.wcity.manage.dao.model.business.IBusinessInfo;
import com.wcity.manage.service.business.BusinessInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by Zm on 2017/3/20.
 */
@Service
public class BusinessInfoServiceImpl implements BusinessInfoService {

    @Resource private BusinessMapper businessMapper;

    @Override
    public Map<String, Object> findListPage(PageModel pageModel) {

        Map<String,Object> map = new HashMap<>();
        try {
            List<BusinessInfo> businessInfoList = businessMapper.findListPage(pageModel);
            map.put("info",businessInfoList);
        }catch (Exception e){
            e.printStackTrace();
            map.put("error","服务器异常");
        }
        return map;
    }
}
